package com.hksj.slm.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hksj.common.core.model.Rest;
import com.hksj.slm.query.LightingDeviceQuery;
import com.hksj.slm.service.LightingDeviceService;
import com.hksj.slm.vo.LightingDeviceVO;
import com.hksj.slm.vo.LinkLightingVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "智能照明-照明设备管理")
@RestController
@RequestMapping("/api/slm/lightingDevice")
public class LightingDeviceController {

    @Autowired
    private LightingDeviceService lightingDeviceService;

    @ApiOperation(value = "查询智能照明设备列表",response = LightingDeviceVO.class)
    @PostMapping("/queryLightingDeviceByPage")
    public Rest<IPage<LightingDeviceVO>> queryLightingDeviceByPage(@RequestBody LightingDeviceQuery query){
        return Rest.ok(lightingDeviceService.queryLightingDeviceByPage(query));
    }

}
